
package com.feib.soeasy.action;

import java.io.BufferedInputStream;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.StringReader;
import java.util.Calendar;
import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.commons.lang.StringUtils;

import net.sourceforge.stripes.action.DefaultHandler;
import net.sourceforge.stripes.action.DontBind;
import net.sourceforge.stripes.action.ForwardResolution;
import net.sourceforge.stripes.action.Resolution;
import net.sourceforge.stripes.action.StreamingResolution;
import net.sourceforge.stripes.integration.spring.SpringBean;
import net.sourceforge.stripes.validation.DateTypeConverter;
import net.sourceforge.stripes.validation.LocalizableError;
import net.sourceforge.stripes.validation.SimpleError;
import net.sourceforge.stripes.validation.Validate;
import net.sourceforge.stripes.validation.ValidationErrors;

import com.feib.soeasy.model.Group;
import com.feib.soeasy.model.Payment;
import com.feib.soeasy.pagination.PaginatedList;
import com.feib.soeasy.service.GroupService;
import com.feib.soeasy.service.Soez5008Service;
import com.feib.soeasy.util.UserUtil;

/**
 * @title (#)Soez5008ActionBean.java<br>
 * @description <br>
 * @author Jimmy Liu<br>
 * @version 1.0.0 2010/11/25
 * @copyright Far Eastern International Bank Copyright (c) 2010<br>
 * @2011/3/19 create by Jimmy Liu<br>
 */
public class Soez5008ActionBean extends BaseActionBean {


	private static final String DEFAULT_JSP = "/WEB-INF/views/soez5008/soez5008.jsp";

	/**
	 * 業者代號查詢畫面
	 */
	//private static final String AJAX_QUERY_GROUP_JSP = "/WEB-INF/views/soez5008/groupPopUpList.jsp";

	//private static final String AJAX_LIST_BY_GROUP = "/WEB-INF/views/soez5008/soez5008ListByGroup.jsp";
	private static final String AJAX_LIST_DETAIL = "/WEB-INF/views/soez5008/soez5008DetailList.jsp";

	//    private Payment qryPayment;

	/**
	 * 查詢條件
	 * 資料期間基礎：1: 傳輸日期  2:實際繳款日。
	 */
	//    private Integer qryDateType;

	/**
	 * 查詢條件
	 * 資料期間起
	 */
	@Validate( converter=DateTypeConverter.class)
	private Date qryDateFrom;

	/**
	 * 查詢條件
	 * 資料期間迄
	 */
	@Validate( converter=DateTypeConverter.class)
	private Date qryDateTo;

	/**
	 * 查詢條件
	 * 資料期間起
	 */
	@Validate( converter=DateTypeConverter.class)
	private Date qryDateFromD;

	/**
	 * 查詢條件
	 * 資料期間迄
	 */
	@Validate( converter=DateTypeConverter.class)
	private Date qryDateToD;

	/**
	 * 查詢條件
	 * 資料期間起
	 */
	@Validate( converter=DateTypeConverter.class)
	private Date qryDateFromE;

	/**
	 * 查詢條件
	 * 資料期間迄
	 */
	@Validate( converter=DateTypeConverter.class)
	private Date qryDateToE;

	/**
	 * 查詢條件
	 * 資料期間起
	 */
	@Validate( converter=DateTypeConverter.class)
	private Date qryDateFromF;

	/**
	 * 查詢條件
	 * 資料期間迄
	 */
	@Validate( converter=DateTypeConverter.class)
	private Date qryDateToF;

	/**
	 * 查詢條件
	 * 資料期間起
	 */
	@Validate( converter=DateTypeConverter.class)
	private Date qryDateFromG;

	/**
	 * 查詢條件
	 * 資料期間迄
	 */
	@Validate( converter=DateTypeConverter.class)
	private Date qryDateToG;

	/**
	 * 查詢條件
	 * 資料期間起
	 */
	@Validate( converter=DateTypeConverter.class)
	private Date qryDateFromH;

	/**
	 * 查詢條件
	 * 資料期間迄
	 */
	@Validate( converter=DateTypeConverter.class)
	private Date qryDateToH;

	/**
	 * 查詢條件
	 * 資料期間起
	 */
	@Validate( converter=DateTypeConverter.class)
	private Date qryDateFromAll;

	/**
	 * 查詢條件
	 * 資料期間迄
	 */
	@Validate( converter=DateTypeConverter.class)
	private Date qryDateToAll;

	/**
	 * 統計表查詢結果
	 */
	//private List<Map<String, Object>> queryResult;

	/**
	 * 以業者查詢結果
	 */
	//private List resultByGroup;




	/**
	 * 查詢條件
	 * 帳單業者
	 */
	private Group qryGroup;


	private String queryChannel;

	private String queryCommissionCode;

	private List resultChannelCommissions;

	private String channelD;
	private String channelE;
	private String channelF;
	private String channelG;
	private String channelH;
	
	/**
	 * 區分需要觀察的明細類型
	 * 1.單通路單代碼 ex: 7-11  61D 
	 * 2.單通路全代碼 ex: 7-11
	 * 3.全通路全代碼 ex: 7-11  okcvs
	 */
	private String detailType;

	public String getDetailType() {
		return detailType;
	}

	public void setDetailType(String detailType) {
		this.detailType = detailType;
	}

	/**
	 * 帳單業者查詢結果
	 */
	//private PaginatedList<Group> queryGroupResult;

	@SpringBean("soez5008Service")
	private Soez5008Service soez5008Service;

	//@SpringBean("groupService")
	//private GroupService groupService;


	/**
	 * 查詢結果
	 */
	private PaginatedList<Map<String, Object>> queryResult;

	public PaginatedList<Map<String, Object>> getQueryResult() {
		return queryResult;
	}

	public void setQueryResult(PaginatedList<Map<String, Object>> queryResult) {
		this.queryResult = queryResult;
	}

	@DontBind
	@DefaultHandler
	public Resolution doDefault()
	{
		logger.debug("Enter doDefault mehtod.");
		try {
			Calendar cal = Calendar.getInstance();
			cal.add(Calendar.DATE, -1);
			//qryDateTo = cal.getTime();
			//cal.add(Calendar.MONTH, -1);
			//qryDateFrom = cal.getTime();

			qryDateToD = cal.getTime();
			//cal.add(Calendar.MONTH, -1);
			qryDateFromD = cal.getTime();

			qryDateToE = cal.getTime();
			//cal.add(Calendar.MONTH, -1);
			qryDateFromE = cal.getTime();

			qryDateToF = cal.getTime();
			//cal.add(Calendar.MONTH, -1);
			qryDateFromF = cal.getTime();

			qryDateToG = cal.getTime();
			//cal.add(Calendar.MONTH, -1);
			qryDateFromG = cal.getTime();

			qryDateToH = cal.getTime();
			//cal.add(Calendar.MONTH, -1);
			qryDateFromH = cal.getTime();
			/* 全部勾選 */
			qryDateToAll = cal.getTime();
			qryDateFromAll = cal.getTime();
			
		}
		catch (Exception e) {
		}
		return new ForwardResolution(DEFAULT_JSP); 
	}

	public Resolution doAjaxQuery()
	{
		logger.debug("Enter doAjaxQuery mehtod.");
		try {
			/*            if (null == qryDateType || 2 != qryDateType.intValue())
                qryDateType = new Integer(1);

            if (null == this.qryPayment)
                this.qryPayment = new Payment();

            //如果不是銀行端，則查詢條件要加入帳單業者限制
            if (!UserUtil.isBankGroup())
            {
                this.qryPayment.setGroup(UserUtil.getUserGroup());
            }
            else
            {
                if (null != this.qryPayment.getGroup())
                    this.qryPayment.setGroup(this.groupService.findByExactGroupNo(this.qryPayment.getGroup().getGroupNo()));
            } */

			// queryResult = this.soez5008Service.queryForStatisticsList(this.qryPayment.getGroup(), this.qryDateType, this.qryDateFrom, this.qryDateTo);
			//this.soez5008Service.queryStaticsByChainstoreData("D", qryDateFrom, qryDateTo);
			String[] channels = {
					channelD,channelE,channelF ,channelG, channelH};

			Date [] qryDateFroms = 
			{
					qryDateFromD,qryDateFromE,qryDateFromF,qryDateFromG,qryDateFromH
			};

			Date[] qryDateTos =
			{
					qryDateToD,qryDateToE,qryDateToF,qryDateToG,qryDateToH
			};
			/* JEFF TODO 取得查詢畫面    */
			/* 限制卷商查詢 */
			Group	group=new Group();
			if (!UserUtil.isBankGroup())
			{
				group=UserUtil.getUserGroup();
			}

			//String message = this.soez5008Service.doExportStatisticsHtml(channels,  qryDateFroms, qryDateTos);
			/* 限制卷商查詢 */
			String message = this.soez5008Service.doExportGroupStatisticsHtml(group, channels, qryDateFroms, qryDateTos);

			StreamingResolution resolution = new StreamingResolution("text/html", new StringReader(message.toString()));
			resolution.setCharacterEncoding("UTF-8");
			return resolution;


		}
		catch (Exception e) {
			logger.error("超商代收統計表(月)錯誤(Soez5008ActionBean.doAjaxQuery): {}",e);

			// 轉換錯誤訊息
			ValidationErrors errors = new ValidationErrors();
			errors.addGlobalError(new LocalizableError("doAjaxQuery.exception") );
			getContext().setValidationErrors(errors);
			// 回傳 錯誤 HTML fragments
			return super.errorsToHtmlStreams(errors);

		}

	}


	//2011.12 by Leo
	/*    public Resolution doAjaxQueryByGroup()
    {
    	logger.debug("Enter doAjaxQueryByGroup mehtod.");
        try {
	    	if (null == this.qryPayment)
	            this.qryPayment = new Payment();

	    	//如果不是銀行端，則查詢條件要加入帳單業者限制
	        if (!UserUtil.isBankGroup())
	        {
	            this.qryPayment.setGroup(UserUtil.getUserGroup());
	        }
	        else
	        {
	            if (null != this.qryPayment.getGroup())
	                this.qryPayment.setGroup(this.groupService.findByExactGroupNo(this.qryPayment.getGroup().getGroupNo()));
	        }

	        this.resultByGroup = soez5008Service.queryStatisticsByGroup(qryPayment.getGroup(), qryDateFrom, qryDateTo);
        }
        catch (Exception e) {
            logger.error("超商代收統計查詢錯誤(Soez5008ActionBean.doAjaxQueryByGroup): {}",e);

            // 轉換錯誤訊息
            ValidationErrors errors = new ValidationErrors();
            errors.addGlobalError(new LocalizableError("doAjaxQueryByGroup.exception") );
            getContext().setValidationErrors(errors);
            // 回傳 錯誤 HTML fragments
            return super.errorsToHtmlStreams(errors);

        }
        return new ForwardResolution(AJAX_LIST_BY_GROUP); 
    }*/

	/*	//2011.12 by Leo
	 查詢明細 
	TODO  jeff 原本的取得COMMISSCODES 無法區分群組 需 @Deprecated 
	@Deprecated
	public Resolution doAjaxQueryCommissionCode()
	{
		logger.debug("Enter doAjaxQueryCommissionCode mehtod.");
		try {

			this.resultChannelCommissions = soez5008Service.queryFeedbackLogByChannelCommission(
					queryChannel, queryCommissionCode, qryDateFrom, qryDateTo);
		}
		catch (Exception e) {
			logger.error("超商代收統計查詢錯誤(Soez5008ActionBean.doAjaxQueryCommissionCode): {}",e);

			// 轉換錯誤訊息
			ValidationErrors errors = new ValidationErrors();
			errors.addGlobalError(new LocalizableError("doAjaxQueryCommissionCode.exception") );
			getContext().setValidationErrors(errors);
			// 回傳 錯誤 HTML fragments
			return super.errorsToHtmlStreams(errors);

		}
		return new ForwardResolution(AJAX_LIST_DETAIL); 
	}
	 */

	public Resolution doDownloadDetailExcelFile()
	{
		logger.debug("Enter doDownloadDetailExcelFile mehtod.");
		try {
			/*       	 if (null == this.qryPayment)
	            this.qryPayment = new Payment();

	    	//如果不是銀行端，則查詢條件要加入帳單業者限制
	        if (!UserUtil.isBankGroup())
	        {
	            this.qryPayment.setGroup(UserUtil.getUserGroup());
	        }
	        else
	        {
	            if (null != this.qryPayment.getGroup())
	                this.qryPayment.setGroup(this.groupService.findByExactGroupNo(this.qryPayment.getGroup().getGroupNo()));
	        }
			 */	       String downloadFilePath = soez5008Service.doAjaxQueryCommissionCodeXls(queryChannel, queryCommissionCode, qryDateFrom, qryDateTo);
			 if (null == downloadFilePath)
			 {
				 // 查無資料
			 }

			 File downloadFile = new File(downloadFilePath);
			 byte[] bytes = new byte[(int)downloadFile.length()];

			 BufferedInputStream bufferedInputStream = 
				 new BufferedInputStream(new FileInputStream(downloadFile)); 

			 bufferedInputStream.read(bytes);

			 ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes);
			 inputStream.close();
			 bufferedInputStream.close();

			 String isoFileName = new String("超商傳輸統計明細表.xls".getBytes("MS950"), "ISO8859-1");

			 StreamingResolution streamingResolution = new StreamingResolution( 
					 "application/vnd.ms-excel",inputStream).setFilename(isoFileName);

			 return streamingResolution;
		}
		catch (Exception e) {
			logger.error("", e);
		}
		return new ForwardResolution(DEFAULT_JSP); 
	}


	/*    public Resolution doDownloadGroupExcelFile()
    {
    	 logger.debug("Enter doDownloadGroupExcelFile mehtod.");
         try {
        	 if (null == this.qryPayment)
 	            this.qryPayment = new Payment();

 	    	//如果不是銀行端，則查詢條件要加入帳單業者限制
 	        if (!UserUtil.isBankGroup())
 	        {
 	            this.qryPayment.setGroup(UserUtil.getUserGroup());
 	        }
 	        else
 	        {
 	            if (null != this.qryPayment.getGroup())
 	                this.qryPayment.setGroup(this.groupService.findByExactGroupNo(this.qryPayment.getGroup().getGroupNo()));
 	        }

 	       String downloadFilePath = soez5008Service.doExportStatisticsByGroupXls(qryPayment.getGroup(), qryDateFrom, qryDateTo);
           if (null == downloadFilePath)
           {
               // 查無資料
           }

           File downloadFile = new File(downloadFilePath);
           byte[] bytes = new byte[(int)downloadFile.length()];

           BufferedInputStream bufferedInputStream = 
               new BufferedInputStream(new FileInputStream(downloadFile)); 

           bufferedInputStream.read(bytes);

           ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes);
           inputStream.close();
           bufferedInputStream.close();

           String isoFileName = new String("超商代收統計表.xls".getBytes("MS950"), "ISO8859-1");

           StreamingResolution streamingResolution = new StreamingResolution( 
                           "application/vnd.ms-excel",inputStream).setFilename(isoFileName);

           return streamingResolution;
         }
         catch (Exception e) {
             logger.error("", e);
         }
         return new ForwardResolution(DEFAULT_JSP); 
    }*/

	/**
	 * 下載畫面Excel
	 * @return
	 */
	public Resolution doAjaxDownloadExcelFile()
	{
		logger.debug("Enter doAjaxDownloadExcelFile mehtod.");
		try {
			/*            if (null == qryDateType || 2 != qryDateType.intValue())
                qryDateType = new Integer(1);

            if (null == this.qryPayment)
                this.qryPayment = new Payment();

            //如果不是銀行端，則查詢條件要加入帳單業者限制
            if (!UserUtil.isBankGroup())
            {
                this.qryPayment.setGroup(UserUtil.getUserGroup());
            }
            else
                if (null != this.qryPayment.getGroup())
                this.qryPayment.setGroup(this.groupService.findByExactGroupNo(this.qryPayment.getGroup().getGroupNo()));
			 */            
			String[] channels = {
					channelD,channelE,channelF ,channelG, channelH};

			Date [] qryDateFroms = 
			{
					qryDateFromD,qryDateFromE,qryDateFromF,qryDateFromG,qryDateFromH
			};

			Date[] qryDateTos =
			{
					qryDateToD,qryDateToE,qryDateToF,qryDateToG,qryDateToH
			};


			/*JEFF TODO 取得查詢畫面    */
			/* 限制卷商查詢 */
			Group	group=new Group();
			if (!UserUtil.isBankGroup())
			{
				group=UserUtil.getUserGroup();
			}

			//String downloadFilePath = this.soez5008Service.doExportStatisticsXls(channels,  qryDateFroms , qryDateTos);
			String downloadFilePath = this.soez5008Service.doExportGroupStatisticsXls(group,channels,  qryDateFroms , qryDateTos);

			if (null == downloadFilePath)
			{
				// 查無資料
			}

			File downloadFile = new File(downloadFilePath);
			byte[] bytes = new byte[(int)downloadFile.length()];

			BufferedInputStream bufferedInputStream = 
				new BufferedInputStream(new FileInputStream(downloadFile)); 

			bufferedInputStream.read(bytes);

			ByteArrayInputStream inputStream = new ByteArrayInputStream(bytes);
			inputStream.close();
			bufferedInputStream.close();

			String isoFileName = new String("超商傳輸統計表.xls".getBytes("MS950"), "ISO8859-1");

			StreamingResolution streamingResolution = new StreamingResolution( 
					"application/vnd.ms-excel",inputStream).setFilename(isoFileName);

			return streamingResolution;
		}
		catch (Exception e) {
			logger.error("", e);
		}
		return new ForwardResolution(DEFAULT_JSP); 
	}


	/**
	 * TODO
	 * 根據通路跟日期跟代號 取得  CommissionCode 明細 (可分群組)
	 * @author Jeff
	 */
	public Resolution doAjaxQueryCommissionCode()
	{
		logger.debug("Enter doAjaxQueryCommissionCode mehtod.");
		try {
			
			/* 區分需要觀察的明細類型
	 		   1.單通路單代碼 ex: 7-11  61D 
			*/
			 detailType="1";
			
			/* 不是帳單業者要加入限制 */
			Group group=new Group();
			if (!UserUtil.isBankGroup())
			{
				group= UserUtil.getUserGroup();
			}

			if (null == queryResult)
				queryResult = new PaginatedList<Map<String,Object>>();

			//this.queryResult = this.soez5001Service.queryByGroup(group, queryResult);
			this.queryResult = soez5008Service.queryGroupFeedbackLogByChannelCommission(group,queryChannel, queryCommissionCode, qryDateFrom, qryDateTo,queryResult);
	

			//this.resultChannelCommissions = soez5008Service.queryFeedbackLogByChannelCommission(
					//queryChannel, queryCommissionCode, qryDateFrom, qryDateTo);
		}
		catch (Exception e) {
			logger.error("超商代收統計查詢錯誤(Soez5008ActionBean.doAjaxQueryCommissionCode): {}",e);

			// 轉換錯誤訊息
			ValidationErrors errors = new ValidationErrors();
			errors.addGlobalError(new LocalizableError("doAjaxQueryCommissionCode.exception") );
			getContext().setValidationErrors(errors);
			// 回傳 錯誤 HTML fragments
			return super.errorsToHtmlStreams(errors);

		}
		return new ForwardResolution(AJAX_LIST_DETAIL); 
	}


	/**
	 * TODO
	 * 根據通路跟日期 取得  CommissionCode 明細 (可分群組)
	 * @author Jeff
	 */
	public Resolution doAjaxQueryTotalCommissionCode()
	{
		logger.debug("Enter doAjaxQueryTotalCommissionCode mehtod.");
		try {
			
			/* 區分需要觀察的明細類型
	 		   3.全通路單代碼 ex: 7-11  61D 
			*/
			 detailType="3";
			
			
			/* 不是帳單業者要加入限制 */
			Group group=new Group();
			if (!UserUtil.isBankGroup())
			{
				group= UserUtil.getUserGroup();
			}

			if (null == queryResult)
				queryResult = new PaginatedList<Map<String,Object>>();
			
			
			String[] channels = {
					channelD,channelE,channelF ,channelG, channelH};

			Date [] qryDateFroms = 
			{
					qryDateFromD,qryDateFromE,qryDateFromF,qryDateFromG,qryDateFromH
			};

			Date[] qryDateTos =
			{
					qryDateToD,qryDateToE,qryDateToF,qryDateToG,qryDateToH
			};
			/*JEFF TODO 取得查詢畫面    */		

			this.queryResult = soez5008Service.queryGroupFeedbackLogByChannel(group,channels, qryDateFroms, qryDateTos,queryResult);
	
		}
		catch (Exception e) {
			logger.error("超商代收統計查詢錯誤(Soez5008ActionBean.doAjaxQueryTotalCommissionCode): {}",e);

			// 轉換錯誤訊息
			ValidationErrors errors = new ValidationErrors();
			errors.addGlobalError(new LocalizableError("doAjaxQueryTotalCommissionCode.exception") );
			getContext().setValidationErrors(errors);
			// 回傳 錯誤 HTML fragments
			return super.errorsToHtmlStreams(errors);

		}
		return new ForwardResolution(AJAX_LIST_DETAIL); 
	}



	/**
	 * 帳單業者查詢
	 * @return
	 */
	/*    public Resolution doAjaxQueryGroups()
    {
        logger.debug("Enter doAjaxQueryGroups mehtod.");
        try {
            //如果不是銀行端，則查詢條件要加入帳單業者限制
            if (!UserUtil.isBankGroup())
            {
                throw new Exception("No Authority");
            }


            //USER未輸入查詢條件，所以查詢物件會是NULL(查詢物件不可為NULL)
            if (null == qryGroup)
                qryGroup = new Group();

            //呼叫服務查詢
            queryGroupResult = groupService.queryByGroupExcludeBank(qryGroup, queryGroupResult);
        }
        catch (Exception e) {
            logger.error("帳單通路統計表-帳單業者查詢錯誤(Soez5008ActionBean.doAjaxQueryGroups):", e);

            // 轉換錯誤訊息
            ValidationErrors errors = new ValidationErrors();
            errors.addGlobalError(new SimpleError("查詢錯誤！"));
            getContext().setValidationErrors(errors);
            // 回傳 錯誤 HTML fragments
            return super.errorsToHtmlStreams(errors);
        }

        return new ForwardResolution(AJAX_QUERY_GROUP_JSP);
    }*/



	/**
	 * @return the qryPayment
	 */
	/*    public Payment getQryPayment() {
        return qryPayment;
    }


	 *//**
	 * @param qryPayment the qryPayment to set
	 *//*
    public void setQryPayment(Payment qryPayment) {
        this.qryPayment = qryPayment;
    }
	  */

	/**
	 * @return the queryResult
	 */
	/*    public List<Map<String, Object>> getQueryResult() {
        return queryResult;
    }
	 */

	/**
	 * @param queryResult the queryResult to set
	 */
	/*    public void setQueryResult(List<Map<String, Object>> queryResult) {
        this.queryResult = queryResult;
    }
	 */

	/**
	 * @return the queryGroupResult
	 */
	/*    public PaginatedList<Group> getQueryGroupResult() {
        return queryGroupResult;
    }
	 */

	/**
	 * @param queryGroupResult the queryGroupResult to set
	 */
	/*    public void setQueryGroupResult(PaginatedList<Group> queryGroupResult) {
        this.queryGroupResult = queryGroupResult;
    }
	 */
	/**
	 * @return the qryDateType
	 */
	/*    public Integer getQryDateType() {
        return qryDateType;
    }


	 *//**
	 * @param qryDateType the qryDateType to set
	 *//*
    public void setQryDateType(Integer qryDateType) {
        this.qryDateType = qryDateType;
    }
	  */

	/**
	 * @return the qryDateFrom
	 */
	public Date getQryDateFrom() {
		return qryDateFrom;
	}


	/**
	 * @param qryDateFrom the qryDateFrom to set
	 */
	public void setQryDateFrom(Date qryDateFrom) {
		this.qryDateFrom = qryDateFrom;
	}


	/**
	 * @return the qryDateTo 
	 */
	public Date getQryDateTo() {
		return qryDateTo;
	}


	/**
	 * @param qryDateTo the qryDateTo to set
	 */
	public void setQryDateTo(Date qryDateTo) {
		this.qryDateTo = qryDateTo;
	}


	/**
	 * @return the qryGroup
	 */
	public Group getQryGroup() {
		return qryGroup;
	}


	/**
	 * @param qryGroup the qryGroup to set
	 */
	public void setQryGroup(Group qryGroup) {
		this.qryGroup = qryGroup;
	}

	/*	public List getResultByGroup() {
		return resultByGroup;
	}

	public void setResultByGroup(List resultByGroup) {
		this.resultByGroup = resultByGroup;
	}
	 */
	public String getQueryChannel() {
		return queryChannel;
	}

	public void setQueryChannel(String queryChannel) {
		this.queryChannel = queryChannel;
	}

	public String getQueryCommissionCode() {
		return queryCommissionCode;
	}

	public void setQueryCommissionCode(String queryCommissionCode) {
		this.queryCommissionCode = queryCommissionCode;
	}

	public List getResultChannelCommissions() {
		return resultChannelCommissions;
	}

	public void setResultChannelCommissions(List resultChannelCommissions) {
		this.resultChannelCommissions = resultChannelCommissions;
	}

	public Date getQryDateFromD() {
		return qryDateFromD;
	}

	public void setQryDateFromD(Date qryDateFromD) {
		this.qryDateFromD = qryDateFromD;
	}

	public Date getQryDateToD() {
		return qryDateToD;
	}

	public void setQryDateToD(Date qryDateToD) {
		this.qryDateToD = qryDateToD;
	}

	public Date getQryDateFromE() {
		return qryDateFromE;
	}

	public void setQryDateFromE(Date qryDateFromE) {
		this.qryDateFromE = qryDateFromE;
	}

	public Date getQryDateToE() {
		return qryDateToE;
	}

	public void setQryDateToE(Date qryDateToE) {
		this.qryDateToE = qryDateToE;
	}

	public Date getQryDateFromF() {
		return qryDateFromF;
	}

	public void setQryDateFromF(Date qryDateFromF) {
		this.qryDateFromF = qryDateFromF;
	}

	public Date getQryDateToF() {
		return qryDateToF;
	}

	public void setQryDateToF(Date qryDateToF) {
		this.qryDateToF = qryDateToF;
	}

	public Date getQryDateFromG() {
		return qryDateFromG;
	}

	public void setQryDateFromG(Date qryDateFromG) {
		this.qryDateFromG = qryDateFromG;
	}

	public Date getQryDateToG() {
		return qryDateToG;
	}

	public void setQryDateToG(Date qryDateToG) {
		this.qryDateToG = qryDateToG;
	}

	public Date getQryDateFromH() {
		return qryDateFromH;
	}

	public void setQryDateFromH(Date qryDateFromH) {
		this.qryDateFromH = qryDateFromH;
	}

	public Date getQryDateToH() {
		return qryDateToH;
	}

	public void setQryDateToH(Date qryDateToH) {
		this.qryDateToH = qryDateToH;
	}

	public Date getQryDateFromAll() {
		return qryDateFromAll;
	}

	public void setQryDateFromAll(Date qryDateFromAll) {
		this.qryDateFromAll = qryDateFromAll;
	}

	public Date getQryDateToAll() {
		return qryDateToAll;
	}

	public void setQryDateToAll(Date qryDateToAll) {
		this.qryDateToAll = qryDateToAll;
	}


	public String getChannelD() {
		return channelD;
	}

	public void setChannelD(String channelD) {
		this.channelD = channelD;
	}

	public String getChannelE() {
		return channelE;
	}

	public void setChannelE(String channelE) {
		this.channelE = channelE;
	}

	public String getChannelF() {
		return channelF;
	}

	public void setChannelF(String channelF) {
		this.channelF = channelF;
	}

	public String getChannelG() {
		return channelG;
	}

	public void setChannelG(String channelG) {
		this.channelG = channelG;
	}

	public String getChannelH() {
		return channelH;
	}

	public void setChannelH(String channelH) {
		this.channelH = channelH;
	}


}
